Fire up your applications with Jetfire
RSS
Jetfire Wiki


Quick Search
»
Advanced Search »

Page History: Jetfire Code: Schedule

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: 2009/07/29 02:31


Table of Contents [Hide/Show]


Jetfire Code: Schedule

The Jetfire Code Class for Schedule is shown below in the box. This class is as a model for schedules in project-style workflows.

// S C H E D U L E   W O R K F L O W
//===================================================================================
// Schedule.txt
//===================================================================================
// Copyright (C) 2007 TrackerRealm Corporation
// This file is part of Jetfire.
// 
// Jetfire is open software: you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software Foundation,
// version 3 of the License.
// 
// Jetfire is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE.  See the GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License along with Jetfire.
// If not, see http://www.gnu.org/licenses.
// REMOVAL OF THIS NOTICE IS VIOLATION OF THE COPYRIGHT.
//===================================================================================
//
namespace JetfireApps
{
   // Schedule - A schedule is a general workflow for calendar items.
   public workflow Schedule
   {
		// C O N S T R U C T O R
		public Schedule()
		{
			// Initialize these variables
			StartDateTime = DateTime.Today;
			EndDateTime = DateTime.Today;
			Duration = TimeSpan.Zero;
			IsStarted = false;
			IsDone = false;
			TypeOfWork = TypeOfWork.Meeting;
			ScheduleType = ScheduleType.Forecast;
			ShowTimeAs = ShowTimeAs.Busy;
			RecurrenceState = RecurrenceState.None;
			PercentComplete = 0;
			Priority = Priority.Normal;
		}
		// C O M M A N D S

		// P R O P E R T I E S

		/// Gets and Sets the Start Date and Time 
		public DateTime StartDateTime
		{
			get;
			set;
		}
		/// Gets and Sets the End Date and Time
		public DateTime EndDateTime
		{
			get;
			set;
		}
		/// Gets and Sets the Duration
		public TimeSpan Duration
		{
			get;
			set;
		}
		/// Gets and Sets the Workflow
		public Workflow Workflow
		{
			get;
			set;
		}
		/// Gets and Sets a flag that indicates the work is for all day
		public bool AllDay
		{
			get;
			set;
		}
		/// Gets and Sets the Worker of the work
		public Worker Worker
		{
			get;
			set;
		}
		/// Gets and Sets the Location of the work
		public Location Location
		{
			get;
			set;
		}
		/// Gets and Sets the Type of Work 
		public TypeOfWork TypeOfWork
		{
			get;
			set;
		}
		/// Gets and Sets the way to show the time on a calendar
		public ShowTimeAs ShowTimeAs
		{
			get;
			set;
		}
		/// Gets and Sets a flag that indicates that the work is started 
		public bool IsStarted
		{
			get;
			set;
		}
		/// Gets and Sets a flag that indicates that the work is done 
		public bool IsDone
		{
			get;
			set;
		}
		/// Get a flag that indicates that the work is a holiday
		public bool IsHoliday
		{
			get { return TypeOfWork == TypeOfWork.Holiday; }
		}
		/// Get a flag that indicates that the work is a task
		public bool IsTask
		{
			get
			{
				if (TypeOfWork == TypeOfWork.Task)
					return true;
				return TypeOfWork == TypeOfWork.To_Do;
			}
		}
		/// Get a flag that indicates that the work is a to do item
		public bool IsToDo
		{
			get { return TypeOfWork == TypeOfWork.To_Do;		}
		}
		/// Get a flag that indicates that the work is a meeting
		public bool IsMeeting
		{
			get
			{
				if (TypeOfWork == TypeOfWork.Meeting)
					return true;
				return TypeOfWork == TypeOfWork.Appointment;
			}
		}
		/// Get a flag that indicates that the work is an event
		public bool IsEvent
		{
			get { return TypeOfWork == TypeOfWork.Event; }
		}
		/// Gets and Sets the type of Schedule
		public ScheduleType ScheduleType
		{
			get;
			set;
		}
		/// Gets and Sets the percent completion of the work
		public uint PercentComplete
		{
			get;
			set;
		}
		/// Gets and Sets the priority of the work
		public Priority Priority
		{
			get;
			set;
		}
		/// Gets and Sets how often this schedule is repeated
		public RecurrenceState RecurrenceState
		{
			get;
			set;
		}
   }
}

ScrewTurn Wiki version 3.0.4.560. Some of the icons created by FamFamFam.